Chapter 5 - Shadows



bridge~1.jpg


While this contraction renders, welcome back to this tutorial on HDRI shadowing. I picked this object because it has a lot of nooks and crannies for light and darkness or shadowing. I am using Ray trace shadows which are generally hard or very defined. Depth of field post processing is going to be used once this scene is finished rendering, this will help soften somewhat the hard shadows. The HDRI I am using is mostly lighting this object from below and to the right. Lighting and shadowing work together to form your rendered image from the scene you created., you could say the darkness defines the light, so having good shadows goes along with good lighting.

 

1.  After completing this tutorial you should be able to use shadows with HDRI lighting,

     a.  Be able to use soft shadows or hard shadows.

     b.  Use transparent shadows

     c.  Able to use HDRI lighting in an enclosed space.

 

2.  Lets go ahead and load the HDRIcourseSetup scene. I am sure you have been experimenting with HDRI and are having some fun with some interesting HDRI renders.

 

3.  On the Global environment mapping panel, you turn on and off HDRI shadowing by using Environment shadows button, when the button shows a shadow under the sphere HDRI shadowing will be used. Right click to open the Environment shadow panel.

 

4.  You will find many powerful options for shadowing in the TS HDRI.

 

5.  For environment Shadows you have two types:

 

     a.            Map and Ray

                    i.        Map

                              (1)     uses shadow maps to create soft-edged shadows

 

                    ii.       Ray

                              (1)     uses ray tracing to make shadows, which are in general hard-edged but very accurate. In addition ray trace shadows allows use of transparent shadows or shadows formed by going through material with transparency.

                                         (a)     Ray type shadows can be soften using several techniques which we will explore.

                                         

                    iii.      Select Ray as shadow type and under Shadow Transparency select solid shadows, We will cover these transparency settings shortly. In the Global environment panel uncheck the Show Environment Image. Move closer if you want, I am going to just select perspective view and render.

                              (1)     As you probably already notice the shadows are well defined or very sharp in appearance.

 

                    iv.      Now select Map and render

                              (1)     Notice the edges have smoother transitions

 

     b.            Shadow Transparency has three choices

 

                    i.        Solid shadows/ Transparent shadows/ Transparent shadows Advance

                              (1)     Solid shadows

                                         (a)     we have used already, all shadow casting objects will cast solid shadows

                              (2)     Transparent shadows

                                         (a)     the shadow transparency depends on object transparency. We do have one object with transparency lets check it out.

                                         (b)     go ahead and select transparent shadows and render

                                                   (i)      notice now the shadow takes into account color of the transparent material.

                                                   (ii)     The shadow becomes hard again since ray tracing is used to calculate shadows even though the shadow type is still selected as map.

                              (3)     Transparent Shadows Advanced

                                         (a)     This option is available but will usually take more time to render. If you come across an object that doesn’t appear to have proper transparent shadows, you can try this option which is a less optimize version but more thorough in calculating transparent shadows.

     c.            The Map size setting is:

                    i.        Used when the Map shadow type is selected: This determines the resolution of the shadow map. The larger the map size, the more detailed the shadows, and therefore the longer the processing time.

                              (1)     Make sure Shadow type is selected to map,

                                         (a)     and shadow transparency to solid shadows (remember when shadow transparency is selected to either of the two transparent type shadows Ray traced shadows are used).

                                         (b)     select Map size to low and then render.

                                         (c)     Notice the quality of the shadows

                              (2)     Set Map size value to High and render again

                                         (a)     do you see the differences.

                              (3)     You can use higher values then the preselected values , just note render time usually will go up with higher values.

     d.            Sharpness: Determines how sharp the boundaries of mapped shadows appear. A larger value creates sharper shadows

                    i.        set this value to 10

                              (1)     watch what happens with the chair shadows when rendering

                              (2)     notice the differences?

 

     e.            Quality: Determines the quality soft shadows. This setting works with the other shadow parameters, as in map size and sharpness. On your own Experiment with this setting.

 

     f.             Noise Factor:

 

                    i.        Noise Factor can help soften ray casting type shadows in conjunction with increasing the number of Samples used . This setting affects Ray casting type shadows. This can also help in shadowing artifacts, resulting from taking and processing of HDRI data with camera lens flare and other limitations, resulting in extra light sources not part of original the environment. With smaller Sample settings these less intense lighting artifacts may not be present but can become apparent at higher Sample settings.

                              (1)     Set Sample settings to 25

                              (2)     Set Light Intensity to 2.2

                              (3)     Shadow type - Ray

                              (4)     Shadow transparency to Transparent Shadows

                              (5)     Noise factor .5

                              (6)     and render (I am going to time lapse the render due to time).

                                         (a)     at close distances with low sample settings the noise can be very visible

                                         (b)     shadow artifacting or banding is also present with multiple shadows.

 

                    ii.       with same setting for shadows, change the Environment map panel Sample setting to 125, Light Intensity to 3.2 and render

                              (1)     Render (time lapsed)

                                         (a)     notice that the ray traced shadows are much softer

                                         (b)     shadow banding is no where to be found.

                                         (c)     each scene and HDRI will dictate the best settings so some experimentation maybe required for best quality.

                                         (d)     If shadows are too weak from the increase sampling and or added noise, other techniques can be used and will be covered in the advance sections of course.

 

6.       Lets go ahead and load a new scene from the HDRIcourseScene library

          a.       Load the shadowbox scene

 

                    i.        The HDRI settings are automatically updated for this scene.

 

                    ii.       This is simple scene with objects making the walls, windows, ceiling and a floor

 

                    iii.      Go ahead and select camera view and then render

                              (1)     Everything is dark inside?

                              (2)     besides what you see through the windows and some reflection on the floor, it is rather dark. Why you might ask?

                                         (a)     well that is because the HDRI lighting is being blocked by all the pieces making up this simple building.

                              (3)     Lets go ahead and turn off HDRI shadowing and render again.

                                         (a)     As you can see everything is bright now and being lighted, except now there are no shadows. If I had some objects in here they too would not have any shadows.

                              (4)     Since shadowing is what we want, here is a simple way to be able to use both HDRI and shadowing inside a room

                                         (a)     Enable Environment shadows

                                                   (i)      since we are not going to touch any of these settings over here I am going to close the Global environment and shadow panels

                                         (b)     Go to the object tool and right click to open up the object information panel

                                                   (i)      select Render Options and note the object render panel

                                                             1)      each individual object shadowing can be turned on or off though this panel

                                                             2)      Go ahead and select WindowGlass

                                                                        a)       uncheck object render

                                                                                  i)       Cast shadows

                                                                                  ii)      and Receive shadows

                                                                        b)      render

                                                                                  i)       Now HDRI lighting is allowed to pass through the windows since shadowing for those objects are turned off..

                                                                                  ii)      This is maybe what you might want, an outside view with light coming into your scene while you add your custom lights to light up the rest of the interior.

                                         (c)     Lets go ahead and try a different combination

                                                   (i)      Select Ceiling

                                                             1)      uncheck Cast shadows

                                                   (ii)     Select floor

                                                             1)      uncheck Cast shadows

                                                   (iii)    Render

                                                             1)      now you see the room is being lighted by HDRI lighting and shadowing is from the walls.

                                                                        a)       A much more complex model can be built allowing different objects to cast shadows or not, combined with your custom lighting, giving great flexibility over the lighting and shadowing environment of your scene.

                                         (d)     That’s it for shadowing for now see you around the corner.